<div class="tableToolbar">
    <div class="coll-md-9" id="addInput">
        <div class="coll-md-2">
            <input type="text" class='search' placeholder="用户名" ng-model="ctrlScope.itemsearch.username">
        </div>
        <div class="coll-md-2 scalenone" id="search2">
        <div class="coll-md-5 triangle">
            <select class="form-control" ng-model="ctrlScope.itemsearch.status">
                <option selected disabled hidden value="">状态</option>
                <option value="1">启用</option>
                <option value="0">不启用</option>
            </select>
        </div>
        <div class="coll-md-5 triangle">
            <select class="form-control" ng-model="ctrlScope.itemsearch.type">
                <option selected disabled hidden value="">类型</option>
                <option value="1">员工</option>
                <option value="2">资方</option>
                <!--<option value="3">业务员</option>-->
            </select>
        </div>
    </div>
        <div class="coll-md-4 scalenone"  id="searchdate" datahide>
            <div class="coll-md-5" >
                <p class="input-group">
                    <input type="text" class="search" placeholder="添加开始时间" uib-datepicker-popup="yyyy-MM-dd"
                           ng-model="ctrlScope.itemsearch.beginDateTimex" is-open="popup1.opened" datepicker-options="dateOptions"/>
						<span class="input-group-btn">
							            <button type="button" class="small-icon btn btn-default" ng-click="open1()"><i
                                                class="glyphicon glyphicon-calendar"></i></button>
							          </span>
                </p>
            </div>
            <div class="coll-md-5">
                <p class="input-group inline">
                    <input type="text" class="search" placeholder="添加结束时间" uib-datepicker-popup="yyyy-MM-dd"
                           ng-model="ctrlScope.itemsearch.endDateTimex" is-open="popup2.opened" datepicker-options="dateOptions"/>
						<span class="input-group-btn">
							            <button type="button" class="small-icon btn btn-default" ng-click="open2()"><i
                                                class="glyphicon glyphicon-calendar"></i></button>
							          </span>
                </p>
            </div>
        </div>
        <div class="coll-md-1">
            <input type="button" class="small-icon search2-icon" value="搜索" ng-click="search()">
            <input type="button" class="small-icon search2" value="搜索">
            <input type="button" class="small-icon reset-icon" reset-icon value="重置" ng-click="reset()">
            <input type="button" class="small-icon reset" value="重置">

            <div class="dropdown-menu-right">
                <input type="button" class="small-icon more-icon" value="更多" title='更多搜索项' id="more-icon" data-toggle="dropdown"
                       aria-haspopup="true" aria-expanded="false">
                <input type="button" class="small-icon more" value="更多">
                <ul class="dropdown-menu" style='margin-left:80px;' aria-labelledby="dropdownMenu2" more-search>
                    <li><a href="javascript:;">日期搜索</a></li>
                    <li><a href="javascript:;">状态搜索</a></li>
                </ul>
            </div>
        </div>
    </div>
    <div class="coll-md-1">
        <input type="button" class="bttn pos-right"  ng-click="addOrderModal()" value="新建">
    </div>
</div>
<table ui-table="orderParams">
    <thead>
    <tr>
        <th>ID</th>
        <th>类型</th>
        <th>用户名</th>
        <th>性别</th>
        <th>部门职位</th>
        <th>邮箱</th>
        <th>手机号码</th>
        <th>添加时间</th>
        <th>状态</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>
    <tr ng-repeat="item in orderParams.$rows">
        <td>{{item.id}}</td>
        <th>{{item.type | sysUserType}}</th>
        <td>{{item.sysUserName}}</td>
        <td>{{item.sex | sexStatus}}</td>
        <td>{{item.roleName}}</td>
        <td>{{item.email}}</td>
        <td>{{item.mobile}}</td>
        <td>{{item.addtime | date: 'yyyy-MM-dd HH:mm:ss'}}</td>
        <td>{{item.status | bankcardStatus}}</td>
        <td>
            <a ng-click="userModal(item.id)">编辑</a>
            <a ng-click="modify(item.id)">重置密码</a>
        </td>
    </tr>
    </tbody>
</table>
<modal title="新建" visible="addModal">
    <form class="form-horizontal" role="form" name="myForm" ng-submit="addSubmit(myForm.$valid)" novalidate>
        <div class="form-body">
            <div class="row">
                <div class="col-md-6">
                    <div class="form-group">
                        <label class="control-label col-md-4">用户名</label>
                        <div class="col-md-8">
                            <input type="text" class="form-control" name="add.sysUserName" ng-model="add.sysUserName" placeholder="用户名" required>
                        </div>
                    </div>
                </div>
                <div class="col-md-6">
                    <div class="form-group">
                        <label class="control-label col-md-4">密码</label>

                        <div class="col-md-8">
                            <input type="text" class="form-control" name="add.password" ng-model="add.password" placeholder="密码" required>
                        </div>
                    </div>
                </div>
                <div class="col-md-6">
                    <div class="form-group" style="margin-bottom:13px">
                        <label class="control-label col-md-4">性别</label>

                        <div class="col-md-8 triangle-left">
                            <select  name="add.sex" class="form-control" ng-model="add.sex" ui-select2="select2Options" required>
                                <option value="" disabled selected hidden>请选择</option>
                                <option value="1">男</option>
                                <option value="0">女</option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="col-md-6">
                    <div class="form-group">
                        <label class="control-label col-md-4">出生年月</label>
                        <div class="col-md-8" style="height:34px">
                            <p class="input-group inline">
                                <input type="text" class="form-control" placeholder="出生年月" uib-datepicker-popup="yyyy-MM-dd"
                                       ng-model="add.birthday" name="add.birthday" is-open="popup3.opened" datepicker-options="dateOptions" required/>
                                <span class="input-group-btn">
							            <button type="button" class="btn btn-default" ng-click="open3()"><i
                                                class="glyphicon glyphicon-calendar"></i></button>
							            </span>
                            </p>
                        </div>

                    </div>
                </div>
                <div class="col-md-6">
                    <div class="form-group">
                        <label class="control-label col-md-4">邮箱</label>

                        <div class="col-md-8">
                            <input type="email" class="form-control"  name="add.email" ng-model="add.email" placeholder="邮箱" required>
                        </div>
                    </div>
                </div>
                <div class="col-md-6">
                    <div class="form-group">
                        <label class="control-label col-md-4">手机号码</label>

                        <div class="col-md-8">
                            <input type="text" class="form-control"  name="add.mobile" ng-model="add.mobile" placeholder="手机号码" required>
                        </div>
                    </div>
                </div>
                <div class="col-md-6">
                    <div class="form-group" style="margin-bottom:13px">
                        <label class="control-label col-md-4">操作人类型</label>

                        <div class="col-md-8 triangle-left">
                            <select class="form-control" required ui-select2="select2Options" name="add.type" ng-model="add.type" required>
                                <option value="">请选择</option>
                                <option value="1">操作员</option>
                                <option value="2">资方</option>
                                <!--<option value="3">业务员</option>-->
                                <!--<option value="4">平台账户</option>-->
                            </select>
                        </div>
                    </div>
                </div>
                <div class="col-md-6" ng-if="add.type==2">
                    <div class="form-group" style="margin-bottom:13px">
                        <label class="control-label col-md-4">资产方</label>
                        <div class="col-md-8">
                            <select class="form-control" required ui-select2="selectOptions" name="add.assetId" ng-model="add.assetId" required>
                                <option value="" disabled selected hidden>请选择</option>
                                <option ng-repeat="item in assetList" value="{{item.id}}">{{item.name}}</option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="col-md-6">
                    <div class="form-group">
                        <label class="control-label col-md-4">部门</label>

                        <div class="col-md-8">
                            <input type="text" class="form-control" name="add.deptCode" ng-model="add.deptCode" placeholder="部门" required>
                        </div>
                    </div>
                </div>
                <!--<input type="hidden"  ng-model="add.type" ng-init="add.type=1">-->
                <!--<div class="col-md-6">-->
                <!--<div class="form-group">-->
                <!--<label class="control-label col-md-4">类型</label>-->
                <!--<div class="col-md-8 triangle-left">-->
                <!--<select class="form-control" ng-model="add.type" ui-select2="select2Options" required>-->
                <!--<option value="" disabled hidden selected>请选择</option>-->
                <!--<option value="1">平台账户</option>-->
                <!--<option value="2">担保账号</option>-->
                <!--<option value="3">业务员</option>-->
                <!--</select>-->
                <!--</div>-->
                <!--</div>-->
                <!--</div>-->
                <div class="col-md-6">
                    <div class="form-group" style="margin-bottom:13px">
                        <label class="control-label col-md-4">角色</label>
                        <div class="col-md-8">
                            <select class="form-control" required ui-select2="selectOptions" name="add.character" ng-model="add.character" required>
                                <option value="" disabled selected hidden>请选择</option>
                                <option ng-repeat="item in roleList" value="{{item.id}}">{{item.roleName}}</option>
                            </select>
                        </div>
                    </div>
                </div>

            </div>
            <div class="buttonArea col-md-12">
                <button type="submit" class="btn blue" ng-disabled="myForm.$invalid" ng-click="addSubmit()">提交</button>
            </div>

        </div>
    </form>
</modal>
<modal title="编辑" visible="detailsModal">
    <form class="form-horizontal"  role="form" name="detailsForm" ng-submit="saveSubmit(detailsForm.$valid)" novalidate>
        <div class="form-body">
            <div class="row">
                <div class="col-md-6">
                    <div class="form-group">
                        <label class="control-label col-md-4">用户名</label>
                        <div class="col-md-8">
                            <input type="text" class="form-control" name="list.sysUserName" ng-model="list.sysUserName" placeholder="用户名" required>
                        </div>
                    </div>
                </div>
                <!--<div class="col-md-6">-->
                    <!--<div class="form-group">-->
                        <!--<label class="control-label col-md-4">密码</label>-->

                        <!--<div class="col-md-8">-->
                            <!--<input type="text" class="form-control" name="list.password" ng-model="list.password" placeholder="密码">-->
                        <!--</div>-->
                    <!--</div>-->
                <!--</div>-->
                <div class="col-md-6">
                    <div class="form-group" style="margin-bottom:13px">
                        <label class="control-label col-md-4">性别</label>

                        <div class="col-md-8 triangle-left">
                            <select  name="list.sex" class="form-control" ng-model="list.sex" ui-select2="select2Options" required>
                                <option value="" disabled selected hidden>请选择</option>
                                <option value="1">男</option>
                                <option value="0">女</option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="col-md-6">
                    <div class="form-group">
                        <label class="control-label col-md-4">出生年月</label>
                        <div class="col-md-8" style="height:34px">
                            <p class="input-group inline">
                                <input type="text" class="form-control" placeholder="出生年月" uib-datepicker-popup="yyyy-MM-dd"
                                       ng-model="list.birthday" name="list.birthday" is-open="popup3.opened" datepicker-options="dateOptions" required/>
                                <span class="input-group-btn">
							            <button type="button" class="btn btn-default" ng-click="open3()"><i
                                                class="glyphicon glyphicon-calendar"></i></button>
							            </span>
                            </p>
                        </div>

                    </div>
                </div>
                <div class="col-md-6">
                    <div class="form-group">
                        <label class="control-label col-md-4">邮箱</label>

                        <div class="col-md-8">
                            <input type="email" class="form-control"  name="list.email" ng-model="list.email" placeholder="邮箱" required>
                        </div>
                    </div>
                </div>
                <div class="col-md-6">
                    <div class="form-group">
                        <label class="control-label col-md-4">手机号码</label>

                        <div class="col-md-8">
                            <input type="text" class="form-control"  name="list.mobile" ng-model="list.mobile" placeholder="手机号码" required>
                        </div>
                    </div>
                </div>
                <div class="col-md-6">
                    <div class="form-group" style="margin-bottom:13px">
                        <label class="control-label col-md-4">操作人类型</label>

                        <div class="col-md-8 triangle-left">
                            <select class="form-control" ui-select2="select2Options" name="list.type" ng-model="list.type" required>
                                <option value="">请选择</option>
                                <option value="1">操作员</option>
                                <option value="2">资方</option>
                                <!--<option value="3">业务员</option>-->
                                <!--<option value="4">平台账户</option>-->
                            </select>
                        </div>
                    </div>
                </div>
                <div class="col-md-6" ng-if="list.type==2">
                    <div class="form-group" style="margin-bottom:13px">
                        <label class="control-label col-md-4">资产方</label>
                        <div class="col-md-8">
                            <select class="form-control" required ui-select2="selectOptions" name="list.assetId" ng-model="list.assetId" required>
                                <option value="" disabled selected hidden>请选择</option>
                                <option ng-repeat="item in assetList" value="{{item.id}}">{{item.name}}</option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="col-md-6">
                    <div class="form-group">
                        <label class="control-label col-md-4">部门</label>

                        <div class="col-md-8">
                            <input type="text" class="form-control" name="list.deptCode" ng-model="list.deptCode" placeholder="部门" required>
                        </div>
                    </div>
                </div>
                <!--<input type="hidden"  ng-model="list.type" ng-init="list.type=1">-->
                <!--<div class="col-md-6">-->
                <!--<div class="form-group">-->
                <!--<label class="control-label col-md-4">类型</label>-->
                <!--<div class="col-md-8 triangle-left">-->
                <!--<select class="form-control" ng-model="list.type" ui-select2="select2Options" required>-->
                <!--<option value="" disabled hidden selected>请选择</option>-->
                <!--<option value="1">平台账户</option>-->
                <!--<option value="2">担保账号</option>-->
                <!--<option value="3">业务员</option>-->
                <!--</select>-->
                <!--</div>-->
                <!--</div>-->
                <!--</div>-->
                <div class="col-md-6">
                    <div class="form-group" style="margin-bottom:13px">
                        <label class="control-label col-md-4">角色</label>
                        <div class="col-md-8">
                            <select class="form-control" required ui-select2="selectOptions" name="list.character" ng-model="list.character" required>
                                <option value="" disabled selected hidden>请选择</option>
                                <option ng-repeat="item in roleList" value="{{item.id}}">{{item.roleName}}</option>
                            </select>
                        </div>
                    </div>
                </div>

            </div>

            <!--<div class="row">-->
                <!--<div class="col-md-6">-->
                    <!--<div class="form-group">-->
                        <!--<label class="control-label col-md-4">用户名</label>-->
                        <!--<div class="col-md-8">-->
                            <!--<input type="text" class="form-control" ng-model="list.sysUserName" placeholder="用户名">-->
                        <!--</div>-->
                    <!--</div>-->
                <!--</div>-->
                <!--<div class="col-md-6">-->
                    <!--<div class="form-group">-->
                        <!--<label class="control-label col-md-4">性别</label>-->
                        <!--<div class="col-md-8 triangle-left">-->
                            <!--<select  name="sex" class="form-control" ng-model="list.sex" ui-select2="select2Options">-->
                                <!--<option value="" hidden selected disabled>请选择</option>-->
                                <!--<option value="1">男</option>-->
                                <!--<option value="0">女</option>-->
                            <!--</select>-->
                        <!--</div>-->
                    <!--</div>-->
                <!--</div>-->
            <!--</div>-->
            <!--<div class="row">-->
                <!--<div class="col-md-6">-->
                    <!--<div class="form-group">-->
                        <!--<label class="control-label col-md-4">出生年月</label>-->
                        <!--<div class="col-md-8">-->
                            <!--<p class="input-group inline">-->
                                <!--<input type="text" class="form-control" placeholder="出生年月" uib-datepicker-popup="yyyy-MM-dd"-->
                                       <!--ng-model="list.birthday"  is-open="popup3.opened" datepicker-options="dateOptions"/>-->
						                <!--<span class="input-group-btn">-->
							            <!--<button type="button" class="btn btn-default" ng-click="open3()"><i-->
                                                <!--class="glyphicon glyphicon-calendar"></i></button>-->
							            <!--</span>-->
                            <!--</p>-->
                        <!--</div>-->

                    <!--</div>-->
                <!--</div>-->
                <!--<div class="col-md-6">-->
                    <!--<div class="form-group">-->
                        <!--<label class="control-label col-md-4">邮箱</label>-->
                        <!--<div class="col-md-8">-->
                            <!--<input type="text" class="form-control"  name="email" ng-model="list.email" placeholder="邮箱">-->
                        <!--</div>-->
                    <!--</div>-->
                <!--</div>-->
            <!--</div>-->
            <!--<div class="row">-->
                <!--<div class="col-md-6">-->
                    <!--<div class="form-group">-->
                        <!--<label class="control-label col-md-4">手机号码</label>-->
                        <!--<div class="col-md-8">-->
                            <!--<input type="text" class="form-control"  name="modifyMobile" ng-model="list.mobile" placeholder="手机号码">-->
                        <!--</div>-->
                    <!--</div>-->
                <!--</div>-->
                <!--<div class="col-md-6">-->
                    <!--<div class="form-group">-->
                        <!--<label class="control-label col-md-4">部门</label>-->
                        <!--<div class="col-md-8">-->
                            <!--<input type="text" class="form-control" name="deptCode" ng-model="list.deptCode" placeholder="部门">-->
                        <!--</div>-->
                    <!--</div>-->
                <!--</div>-->
            <!--</div>-->
            <!--&lt;!&ndash;<input type="hidden"  ng-model="list.type" ng-init="list.type=1">&ndash;&gt;-->
            <!--<div class="row">-->
                <!--&lt;!&ndash;<div class="col-md-6">&ndash;&gt;-->
                    <!--&lt;!&ndash;<div class="form-group">&ndash;&gt;-->
                        <!--&lt;!&ndash;<label class="control-label col-md-4">类型</label>&ndash;&gt;-->
                        <!--&lt;!&ndash;<div class="col-md-8 triangle-left">&ndash;&gt;-->
                            <!--&lt;!&ndash;<select class="form-control" ng-model="list.type" ui-select2="select2Options">&ndash;&gt;-->
                                <!--&lt;!&ndash;<option value="" hidden disabled selected>请选择</option>&ndash;&gt;-->
                                <!--&lt;!&ndash;<option value="1">平台账户</option>&ndash;&gt;-->
                                <!--&lt;!&ndash;<option value="2">担保账号</option>&ndash;&gt;-->
                                <!--&lt;!&ndash;<option value="3">业务员</option>&ndash;&gt;-->
                            <!--&lt;!&ndash;</select>&ndash;&gt;-->
                        <!--&lt;!&ndash;</div>&ndash;&gt;-->
                    <!--&lt;!&ndash;</div>&ndash;&gt;-->
                <!--&lt;!&ndash;</div>&ndash;&gt;-->
                <!--<div class="col-md-6">-->
                    <!--<div class="form-group">-->
                        <!--<label class="control-label col-md-4">角色</label>-->
                        <!--<div class="col-md-8 triangle-left">-->
                            <!--<select class="form-control" required ui-select2="selectOptions" ng-model="list.character">-->
                                <!--<option value="" disabled selected hidden>请选择</option>-->
                                <!--<option ng-repeat="item in roleList" value="{{item.id}}">{{item.roleName}}</option>-->
                            <!--</select>-->
                        <!--</div>-->
                    <!--</div>-->
                <!--</div>-->
                <!--<div class="col-md-6">-->
                    <!--<div class="form-group">-->
                        <!--<label class="control-label col-md-4">状态</label>-->
                        <!--<div class="col-md-8 triangle-left">-->
                            <!--<select class="form-control" ng-model="list.status" ui-select2="select2Options">-->
                                <!--<option value="" hidden selected disabled>请选择</option>-->
                                <!--<option value="1">启用</option>-->
                                <!--<option value="0">不启用</option>-->
                            <!--</select>-->
                        <!--</div>-->
                    <!--</div>-->
                <!--</div>-->

            <!--</div>-->
            <div class="buttonArea col-md-12">
                <button type="submit" class="btn blue" ng-disabled="detailsForm.$invalid" ng-click="saveSubmit()">保存</button>
            </div>

        </div>
    </form>
</modal>
<modal title="修改密码" visible="modifyModal">
    <form class="form-horizontal">
        <div class="form-body">
            <div class="col-md-6">
                <div class="form-group">
                    <label class="control-label col-md-4">新密码：</label>
                    <div class="col-md-8">
                        <input type="password" class="form-control" ng-model="modify.newPassword">
                    </div>
                </div>
            </div>
            <div class="buttonArea col-md-12">
                <button type="submit" class="btn blue" ng-click="modifySubmit()">保存</button>
            </div>

        </div>
    </form>
</modal>
